<% layout('/layouts/default.html', {title: '用户提现管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('用户提现管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('mo:moTixian:edit')){ %>
					<a href="${ctx}/mo/moTixian/form" class="btn btn-default btnTool" title="${text('新增用户提现')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${moTixian}" action="${ctx}/mo/moTixian/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('手机号')}：</label>
					<div class="control-inline">
						<#form:input path="mobile" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
			<#form:hidden path="tixianStatus" />
			<div class="form-group">
				<label class="control-label">提现日期：</label>
				<div class="control-inline">
					<#form:input path="workDate_gte" readonly="true" maxlength="20" class="form-control laydate width-date"
					dataFormat="date" data-type="date" data-format="yyyy-MM-dd" data-done="workDate_lte.click()"/>
					&nbsp;-&nbsp;
					<#form:input path="workDate_lte" readonly="true" maxlength="20" class="form-control laydate width-date"
					dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/>
				</div>
			</div>
				<div class="form-group">
					<label class="control-label">${text('提现方式')}：</label>
					<div class="control-inline">
						<#form:select path="type" dictType="mo_tixian_type" blankOption="true" class="form-control"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("昵称")}', name:'icUser.nicheng', index:'a.user_id', width:150, align:"center", frozen:true, formatter: function(val, obj, row, act){
			return val?val:"兼职宝宝"; // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
		}},
		{header:'${text("手机号")}', name:'icUser.mobile', index:'a.user_id', width:150, align:"left", frozen:true},
		{header:'${text("提现时间")}', name:'workDate', index:'a.work_date', width:150, align:"center"},
		{header:'${text("提现方式")}', name:'type', index:'a.type', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('mo_tixian_type')}, val, '${text("未知")}', true);
		}},
		{header:'${text("提现金额")}', name:'money', index:'a.money', width:150, align:"right", formatter: function(val, obj, row, act){
			return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
		}},
		//<% if(moTixian.tixianStatus=="5"){ %>
		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
			var actions = [];
			actions.push('<a href="${ctx}/mo/moTixian/tongguoTixian?id='+row.id+'" class="btnList" title="${text("通过提现")}" data-confirm="${text("确认要通过提现吗？")}">通过</a>&nbsp;');
			return actions.join('');
		}}
		//<% } %>
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>